import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'

function App() {
  const [count, setCount] = useState(0)
  const num1 = 10.1415926
  let obj={name:'John',age:30}
  // e
  const fn=<T,>(a:T)=>{
    console.log(a)
  }
  const fna=<T,>(params:T)=>{
    console.log('34')
  }
  // 7style对象,class,id字符串
  // 8html
  // 9数组遍历
  let style={color:'red'}
  let arr=[1,2,3,4,5]
  return (
    <>
     <div onClick={(e) => fna('0')}>Click me</div>
      <div>
      {<span>54534</span>}
      </div>
      <div>
      {true ? 'true' : 'false'} 
      </div>
      <div>{num1.toFixed(2)}</div>
      <div>{JSON.stringify(obj)}</div>
      <div onClick={fn}>Click me</div>
      <div style={style}>sight</div>
      <div dangerouslySetInnerHTML={{__html: '<h1>Hello</h1>'}}></div>
      <div>{arr.map(v=>{
        return <div id={v} key={v}>{v}</div>
      })}
      </div>
      
    </>
  )
}

export default App
